/*
 * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @Date: 2024-05-09 11:02:48
 * @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @LastEditTime: 2024-06-20 12:38:18
 * @FilePath: \ken147258.topayClient\src\api\other\order.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */


import request from "@/utils/request";
import { AxiosPromise } from "axios";

const URL = {
  getCode: '/skfApi/google/code',
  getBind: '/skfApi/google/bind',
  getUserInfo: '/skfApi/user/info',
  amountList: '/skfApi/amountList',
  lowerLevelList: '/skfApi/lowerLevelList',
  passmodify: '/skfApi/passmodify',
  safety_edit: '/skfApi/safety/edit',
  updateUser: '/skfApi/user/updateUser',
  child_add: '/skfApi/child/add',
  board: '/skfApi/board',
  amount_increase: '/skfApi/amount/increase',
};

export function getCode(): AxiosPromise<any> {
  return request({
    url: URL.getCode,
    method: "get",

  });
}

export function getBind(data: object): AxiosPromise<any> {
  return request({
    url: URL.getBind,
    method: "post",
    data: data,
  });
}

export function getUserInfo(): AxiosPromise<any> {
  return request({
    url: URL.getUserInfo,
    method: "get",

  });
}

export function amountList(data: object): AxiosPromise<any> {
  return request({
    url: URL.amountList,
    method: "get",
    params: data,
  });
}

export function lowerLevelList(data: object): AxiosPromise<any> {
  return request({
    url: URL.lowerLevelList,
    method: "get",
    params: data,
  });
}

export function board(): AxiosPromise<any> {
  return request({
    url: URL.board,
    method: "get",
    // params: data,
  });
}

export function passmodify(data: object): AxiosPromise<any> {
  return request({
    url: URL.passmodify,
    method: "post",
    data: data,
  });
}

export function safety_edit(data: object): AxiosPromise<any> {
  return request({
    url: URL.safety_edit,
    method: "post",
    data: data,
  });
}

export function updateUser(data: object): AxiosPromise<any> {
  return request({
    url: URL.updateUser,
    method: "post",
    data: data,
  });
}

export function child_add(data: object): AxiosPromise<any> {
  return request({
    url: URL.child_add,
    method: "post",
    data: data,
  });
}

export function amount_increase(data: object): AxiosPromise<any> {
  return request({
    url: URL.amount_increase,
    method: "post",
    data: data,
  });
}
